HID touch screen driver installation for CentOS 5 dual monitor
(C) 2010 Eric Liang

==============================================================================
QUICKSTART GUIDE
==============================================================================
I. Before install

1. Please set 2 monitors to the same resolution.
2. Please eneble "dual head" from [System]->[Administartion]->[Display]
3. In "Dual head" tab, check "Use dual head" and configure your settings.
4. Please set Desktop layout to "Individual Desktops"
5. After setup completed, please reboot PC and check if dual monitor works.
6. You can check /etc/X11/xorg.conf. In Section "ServerLayout".
   please make sure "Xinerama" is set to "off" and "Screen0" LeftOf "Screen1".

Section "ServerLayout"
	Identifier     "Multihead layout"
	Screen      0  "Screen0" LeftOf "Screen1"
	Screen      1  "Screen1" 0 0
	InputDevice    "Keyboard0" "CoreKeyboard"
	InputDevice    "Synaptics" "CorePointer"
	Option	    "Xinerama" "off"
	Option	    "Clone" "off"  
EndSection

7. Please check dual monitors and screens were set correctly.

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "LCD Panel 1024x768"
	HorizSync    31.5 - 48.0
	VertRefresh  56.0 - 65.0
	Option	    "dpms"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "LCD Panel 1024x768"
	HorizSync    31.5 - 48.0
	VertRefresh  56.0 - 65.0
	Option	    "dpms"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
        Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
                Modes    "1024x768"
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Videocard1"
	Monitor    "Monitor1"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes    "1024x768"
	EndSubSection
EndSection

II. Installsation guide

1. Open terminal
2. Enter root user
# sudo -s
3. Execute setup.sh
# sh setup.sh
4. After running setup.sh, in Section "ServerLayout"
	InputDevice	"HID TOUCH1"
	InputDevice	"HID TOUCH2"
   will be added.
   
 Besides, 2 additional "InputDevice" will be added too.
   
   Section "InputDevice"
	Identifier	"HID TOUCH1"
	Driver		"xfhiddrv"
	Option		"Device"	"/dev/hiddev0"
	Option		"ScreenNo"	"0"
	Option		"SwapY"	"0"
	Option		"SendCoreEvents"	"true"
	Option		"VirtualScreen"	"1"
	Option		"Screen_MinX"	"0"
	Option		"Screen_MaxX"	"2047"
	Option		"Screen_MinY"	"0"
	Option		"Screen_MaxY"	"4095"
   EndSection

   Section "InputDevice"
	Identifier	"HID TOUCH2"
	Driver		"xfhiddrv"
	Option		"Device"	"/dev/hiddev1"
	Option		"ScreenNo"	"0"
	Option		"SwapY"	"0"
	Option		"SendCoreEvents"	"true"
	Option		"VirtualScreen"	"2"
	Option		"Screen_MinX"	"2047"
	Option		"Screen_MaxX"	"4095"
	Option		"Screen_MinY"	"0"
	Option		"Screen_MaxY"	"4095"
   EndSection

5. Assign touch controller to individual display:
   #Align_USB -D1
   Please touch first screen
   #Align_USB -D2
   Please touch second screen 


III. Setup and run Linear Utility:

1. Run linearity utility to calibrate touch screens
   #LinearAp_USB  -D1 4  
   #LinearAp_USB  -D2 4
   You can change 2nd arguament from 4 to 9 to do 9 points calibration.
  
IV. Removing driver
    
     Please run remove.sh with root permission 
     #sh remove.sh     
